home *** CD-ROM | disk | FTP | other *** search
-
- /********************************************
- **** Animation Class Library V1.0 © 1994 Yves Schmid & Alia Development
- ****
- **** AnimFrame.h
- ****
- **** Created: 16 May 1994
- **** Modified: 01 Septembre 1994
- **** Version: 0
- **** Compatible: C++, Mac System 7
- ****
- **** Description: AnimFrame is a class which handles one frame of an
- **** animation sequence.
- ****
- **** AnimFrame is a child class of the CoreHead class.
- ****
- *******************/
-
- #ifndef AnimFrame_H
- #define AnimFrame_H
-
-
- #include "AnimGfx.h"
- #include "CoreHead.h"
-
- class Anim;
-
- class AnimFrame : public CoreHead
- {
-
- //***********************************************************
- //.............. P U B L I C M E T H O D S.................
-
- public:
-
- AnimFrame(Anim *anim, long sequence);
- ~AnimFrame();
-
- inline short getwidth(void) const {return (gfx)?gfx->getwidth():0;}
- inline short getheight(void) const {return (gfx)?gfx->getheight():0;}
-
- inline short getchangecounter(void) const {return changecounter;}
- inline short getoffsetx(void) const {return offsetx;}
- inline short getoffsety(void) const {return offsety;}
-
- inline void setchangecounter(const short c) {changecounter = c;}
- inline void setoffsetx(const short x) {offsetx = x;}
- inline void setoffsety(const short y) {offsety = y;}
-
- inline void usegfx(AnimGfx *obj) {gfx = obj;}
- inline void removegfx(void) {gfx = NULL;}
- inline AnimGfx *getgfx(void) {return gfx;}
-
- inline void draw(const short x, const short y)
- {if (gfx) gfx->draw(x+offsetx,y+offsety);}
-
- void relink(Anim *anim, long sequence, long pos);
-
-
- //***********************************************************
-
- protected:
-
- virtual void receivecmd(long cmd, void *info);
-
- private:
-
- short changecounter;
-
- short offsetx,offsety;
- AnimGfx *gfx;
- };
-
-
- #endif
-
-